package com.yichen.bean;

/**
 * @Classname SpringTest
 * @Description
 * @Author caozhenhao001
 * @Date 2024/3/27
 * @Version
 */
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.Arrays;

public class SpringTest {

	public static void main(String[] args) {

		ApplicationContext applicationContext = new AnnotationConfigApplicationContext("com.yichen");
		System.out.println(applicationContext.getBean("people"));

		String[] beanNames = applicationContext.getBeanNamesForType(BeanPostProcessor.class);
		System.out.println(Arrays.toString(beanNames));
	}
}
